<template>
    <div class="regist_box">
    <div class="main_box">
        <div class="close_box" onclick="toggleRegist()">
            <img src="/image/dialog_close.svg" alt="关闭按钮">
        </div>
        <div class="logo_box"><img src="/image/logo.webp" alt="标识"></div>
        <form class="form_box" onsubmit="regist(event, '')" method="post">
            <div class="form_title">注册会员</div>
            <div class="form_item">
                <img class="icon" src="/image/username_icon.svg" alt="用户名">
                <input name="regist_name" placeholder="请输入邮箱地址">
                <img class="option" src="/image/clear_input_icon.svg" alt="清除" onclick="clearInput('regist_name')">
            </div>
            <div class="form_item">
                <img class="icon" src="/image/email_icon.svg" alt="验证码">
                <input name="check_code" maxlength="6" placeholder="请输入验证码">
                <span id="regist_code_btn" onclick="sendCode('regist_name', 'regist_code_btn', 2)">获取验证码</span>
            </div>
            <div class="form_item">
                <img class="icon" src="/image/password_icon.svg" alt="密码">
                <input name="regist_password" type="password" placeholder="请设置密码" autocomplete="on">
                <img class="option" src="/image/close_eye_icon.svg" alt="查看密码" onclick="showPassword(this,'regist_password', '')">
            </div>
            <div class="form_item">
                <img class="icon" src="/image/invent_icon.svg" alt="邀请码">
                <input name="recommend_number" placeholder="请输入邀请码（可不填）">
                <img class="option" src="/image/clear_input_icon.svg" alt="清除" onclick="clearInput('recommend_number')">
            </div>
            <div class="note_box">
                如果加入会员，则表示您同意我们的<br>
                <a href="/terms" target="_blank" rel="nofollow">使用条款</a>&nbsp;及&nbsp;
                <a href="/privacy" target="_blank" rel="nofollow">隐私政策</a>
            </div>
            <div class="button_box">
                <button class="regist_btn" type="submit">注册</button>
                <div>
                    已有账号？&nbsp; <span onclick="(()=>{
                    toggleRegist();
                    publish({code: 1});
                })()">去登录</span>
                </div>
            </div>
        </form>
    </div>
</div>
</template>